package com.device.dto;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.List;
import java.util.UUID;

@Data
public class DeviceDTO implements java.io.Serializable{
    @Id
    @Column(name = "id")
    private UUID id;

    @Column(name = "email", nullable = false)
    private String email;

    @Column(name = "device_model", nullable = false)
    private String deviceModel;

    @Column(name = "device_imei", nullable = false, unique = true)
    private String deviceImei;

    @Column(name = "device_token", nullable = false)
    private String deviceToken;

    @Column(name = "device_remark")
    private String deviceRemark;

    @Column(name = "created_time")
    private Long createdTime;

    @Column(name = "updated_time")
    private Long updatedTime;

    // 添加子设备列表，实现嵌套返回
    private List<SubDeviceDTO> subDevices;
}
